/**
 * This class contains unit tests for validating the behavior of Apex classes
 * and triggers.
 *
 * Unit tests are class methods that verify whether a particular piece
 * of code is working properly. Unit test methods take no arguments,
 * commit no data to the database, and are flagged with the testMethod
 * keyword in the method definition.
 *
 * All test methods in an organization are executed whenever Apex code is deployed
 * to a production organization to confirm correctness, ensure code
 * coverage, and prevent regressions. All Apex classes are
 * required to have at least 75% code coverage in order to be deployed
 * to a production organization. In addition, all triggers must have some code coverage.
 * 
 * The @isTest class annotation indicates this class only contains test
 * methods. Classes defined with the @isTest annotation do not count against
 * the organization size limit for all Apex scripts.
 *
 * See the Apex Language Reference for more information about Testing and Code Coverage.
 */
@isTest
private class ctrl_ContactFullInformation_Test {

    static testMethod void myUnitTest() 
    {
        // TO DO: implement unit test
        Account accountObject1 = new Account();
        accountObject1.Name = 'Test Account';
        accountObject1.Master_Account_Flag__c  = true;
        insert accountObject1;
        
        
        RecordType rt = [select id,Name from RecordType where sObjectType=:'Application__c' and name =:'Employment'];
        string recordType15DigitId =rt.Id;
    
	    recordType15DigitId = recordType15DigitId.substring(0,recordType15DigitId.length()-3);
	    
	    Transaction_Types__c transactionType = new Transaction_Types__c();
	    transactionType.Name = 'Letter - Lost Labor Card';
	    transactionType.Transaction_Type_ID__c = 'Letter - Lost Labor Card';
	    transactionType.Application_Record_Type__c = rt.Name;
	    transactionType.Application_Record_Type_ID__c = recordType15DigitId;
	    transactionType.Active__c = true;
	    insert transactionType;
	    
        
        Tracking__c trackingObject = new Tracking__c();
        trackingObject.Company_Name__c = accountObject1.id;
        trackingObject.Type_of_Application__c = transactionType.id;
        insert trackingObject;
        
        
        //Calling the ContactFullINformation... For Tracking....
        ApexPages.StandardController trackingExtendedObject = new ApexPages.StandardController(trackingObject);
        //ApexPages.CurrentPage().getParameters().put('id',trackingObject.id);
        ApexPages.CurrentPage().getParameters().put('trackingId',trackingObject.id);
        ApexPages.CurrentPage().getParameters().put('objectName','Tracking');
        ctrl_ContactFullInformation contactClass = new ctrl_ContactFullInformation(trackingExtendedObject);
        contactClass.contactObject.LastName = 'Mustafa Test';
        contactClass.saveButtonMethod();
        contactClass.cancelPageMethod();
        
        
        // Transaction Type => 'Visit Visa - 30 days'...
        
        transactionType.Name = 'Visit Visa - 30 days';
	    transactionType.Transaction_Type_ID__c = 'Visit Visa - 30 days';
        update transactionType;
        
        ctrl_ContactFullInformation contactClass1 = new ctrl_ContactFullInformation(trackingExtendedObject);
        contactClass1.contactObject.LastName = 'Mustafa Test 1';
        contactClass1.saveButtonMethod();
        
        
        //Transaction Type => Visit Visa - 90 Days...
        transactionType.Name = 'Visit Visa - 90 days';
	    transactionType.Transaction_Type_ID__c = 'Visit Visa - 90 days';
        update transactionType;
        
        ctrl_ContactFullInformation contactClass2 = new ctrl_ContactFullInformation(trackingExtendedObject);
        contactClass2.contactObject.LastName = 'Mustafa Test 2';
        contactClass2.saveButtonMethod();
        
        //Transaction Type => Cancellation - Unused visit Visa...
        transactionType.Name = 'Cancellation - Unused visit Visa';
        transactionType.Transaction_Type_ID__c = 'Cancellation - Unused visit Visa';
        update transactionType;
        
        ctrl_ContactFullInformation contactClass3 = new ctrl_ContactFullInformation(trackingExtendedObject);
        contactClass3.contactObject.LastName = 'Mustafa Test 3';
        contactClass3.saveButtonMethod();
        
        //Transaction Type => Cancellation - Unused Entry Permit
        transactionType.Name = 'Cancellation - Unused Entry Permit';
        transactionType.Transaction_Type_ID__c = 'Cancellation - Unused Entry Permit';
        update transactionType;
    
    	ctrl_ContactFullInformation contactClass4 = new ctrl_ContactFullInformation(trackingExtendedObject);
        contactClass4.contactObject.LastName = 'Mustafa Test 4';
        contactClass4.saveButtonMethod();
    
    	
    	//For Contact Button...
    	
    	
    	
    	
    	
    
    }
}